<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<script type="text/javascript" src="js/jquery-3.1.0.js"></script>
<script type="text/javascript">
	function dt(id){
		var x=confirm("真的要删除此商品吗？");
		if(x==true){
			alert("此商品已删除");
			location.href="DeleteGoodss?id="+id;
		}

	}
	function dt1(){
		var x=confirm("真的要清空购物车吗？");
		if(x==true){
			alert("购物车空空如也，快去血拼吧");
			location.href="ClearShopCart";
		}

	}


	
</script>
<title>我的购物车</title>
        <link type="text/css" rel="stylesheet"  href="//misc.360buyimg.com/jdf/1.0.0/unit/??ui-base/1.0.0/ui-base.css,shortcut/2.0.0/shortcut.css,global-header/1.0.0/global-header.css,myjd/2.0.0/myjd.css,nav/2.0.0/nav.css,shoppingcart/2.0.0/shoppingcart.css,global-footer/1.0.0/global-footer.css,service/1.0.0/service.css"/>
        <script type="text/javascript" src="//misc.360buyimg.com/jdf/lib/jquery-1.6.4.js"></script>
        <script type="text/javascript" src="//misc.360buyimg.com/jdf/1.0.0/unit/base/1.0.0/base.js"></script>
        <link source="widget" href="//misc.360buyimg.com/user/cart/??/widget/no-login/no-login.css" rel="stylesheet" type="text/css">
        <link type="text/css" rel="stylesheet"  href="//misc.360buyimg.com/user/cart/widget/??common/common.css,header-2015/header-2015.css,cart-sidebar/cart-sidebar.css,cart-sidebar-follow/cart-sidebar-follow.css,cart-filter-bar/cart-filter-bar.css,cart-similar/cart-similar.css,cart-gift/cart-gift.css,order-combined/order-combined.css,unmarket/unmarket.css,cart-inner-new/cart-inner-new.css,cart-toolbar-new/cart-toolbar-new.css,cart-removed/cart-removed.css,cart-full/cart-full.css,cart-tabs-new/cart-tabs-new.css,p-detect/p-detect.css,backpanel/backpanel.css" source="widget"/>
   		<link rel="stylesheet" type="text/css" href="css/style1.css" />
   	  	<link href="image/favico.ico" rel="shortcut icon" />
      	<script type="text/javascript" src="js/shopCart.js"></script>
      	
</head>
<body>

	<div class="main_top">

		<div class="m3">
			<a href="register.jsp" target="_Blank">我的订单</a>
		</div>

		<div class="m2">
			<a href="register.jsp" target="_Blank">免费注册&nbsp&nbsp&nbsp|</a>
		</div>

		<div class="m1">
			<a href="members.jsp" > 
			<c:if test="${empty member[0].memberName}" scope="page" var="result">

        	请登录&nbsp&nbsp&nbsp|

     </c:if> <c:if test="${not result}">

         	${member[0].memberName}&nbsp&nbsp&nbsp|

     </c:if>



			</a>

		</div>

	</div>
<div id="o-header-2013"><div id="header-2013" style="display:none;"></div></div>
<div class="w w1 header clearfix">
	<div id="logo-2014">
		<img src="image/1.png" style="float:left; margin-left:80px; margin-top:-10px;">
		<span style="float:left;margin-left:20px;margin-top:30px;font-weight: bold;font-size: 14px;">购物车</span>
	</div>
	</div>
<div class="k1">
<form action="SettlementServlet" method="post">
<table class="datalist">
    <thead>
        <tr>
            <th width="50">
            <input type="checkbox" id="all" class="all">全选
            </th>
            <th>商品</th>
            <th>单价</th>
            <th>数量</th>
            <th>小计</th>
            <th>操作</th>
        </tr>
    </thead>
  
    <tbody>
    	<c:forEach items="${list}" var="c">
        <tr>
            <td><input type="checkbox" class="one" name="fx"></td>
            <td><a href="Goods?id=${c.id}" >
            	<img src="${c.img}" class="t1">
            	${c.name} ${c.operator}4G手机 双卡双待双通
            	<br>${c.color}
            </a></td>
            
            <td><input type="text"  value="${c.price}" class="hidden" disabled="disabled" name="jg"></td>
            
            <td>
            <div class="k2">
					<input type="button"  value="-"  class="jian">
					<input name="num"  value="${c.num}" class="txt">
					<input type="button"  value="+"  class="jia">
				</div>
			</td>
			
            <td><input value="${c.price*c.num}"  class="xj" name="xj" disabled="disabled" ></td>
            <td>
            <a onclick="dt(${c.id})">删除</a><br>
            <a href="">添加到收藏夹</a>
            </td>
        </tr>
        </c:forEach>
		 <tr>
			<td><a href="Product"><span style="font-size: 12px;font-weight: bold;">继续购物</span></a></td>	 
            <td>
            <a onclick="dt1()">清空购物车</a>
            </td>
            <td><a href="delect?id=${c.productId}">添加到收藏夹</a></td>
            <td>已选择<input id="n">件商品</td>
            <td>总价<span></span></td>
            <td><input type="submit" class="sp3" value="去结算" disabled="disabled"></td>
        </tr>
    </tbody>
</table>
</form>
</div>

	<div style="width:100%; height:20%; float:left;margin-top:30px;">
		<iframe src="foot.jsp"  width="100%" height="350px" frameborder="0" scrolling="no"></iframe>			
	</div>
</body>
</html>